package com.youmingxing.bean;

import org.json.JSONObject;

/**
 * Created by chihiro on 15/9/26.
 */
public class Comment {
    public long id;
    public long createtime;
    public int update_id; // 动态ID
    public int u_id; // 动态ID
    public int user_type;
    public String content; // 评论内容
    public String u_name;
    public String u_img;
    public boolean u_auth;
    public int thumbsup; //评论的点赞数
    public boolean my_thumbsup;//我是否点赞过
    public Comment(JSONObject object) {
        if (object != null) {
            id = object.optLong("id");
            createtime = object.optLong("createtime");
            update_id = object.optInt("update_id");
            content = object.optString("content");
            u_name = object.optString("u_name");
            u_img = object.optString("u_img");
            u_id = object.optInt("u_id");
            user_type = Integer.parseInt(object.optString("user_type"));
            u_auth = object.optBoolean("u_auth");
            thumbsup = object.optInt("thumbsup");
            my_thumbsup = object.optBoolean("my_thumbsup");
        }
    }
}
